﻿<?xml version="1.0" encoding="utf-8" ?>
<Rules FriendlyName="Community Usage Rules">
  <Rule TypeName="MarkDataContractPropertiesWithDataMember"
        Category="Community.Design"
        CheckId="CD1001">
    <Name>Mark DataContract properties with DataMember</Name>
    <Description>Review properties in classes marked with DataContractAttribute to ensure properties are marked with DataMemberAttribute. 
    Properties that are not marked with DataMember will not be serialized and therefore will not participate in WCF operations.</Description>
    <Url></Url>
    <Resolution>Mark the '{0}' property with the DataMember attribute.</Resolution>
    <Email>
    </Email>
    <MessageLevel Certainty="95">Warning</MessageLevel>
    <FixCategories>NonBreaking</FixCategories>
    <Owner />
  </Rule>
  <Rule TypeName="MarkClassWithDataContract"
        Category="Community.Design"
        CheckId="CD1002">
    <Name>Mark class with DataContract where properties with DataMember exist</Name>
    <Description>
      Review properties marked with DataMemberAttribute to ensure their declaring type is marked with DataContractAttribute.
    </Description>
    <Url></Url>
    <Resolution>Mark the '{0}' class with the DataContract attribute.</Resolution>
    <Email>
    </Email>
    <MessageLevel Certainty="95">Warning</MessageLevel>
    <FixCategories>NonBreaking</FixCategories>
    <Owner />
  </Rule>
  <Rule TypeName="ScopeDataMemberPropertiesAsPublic"
        Category="Community.Design"
        CheckId="CD1003">
    <Name>Scope properties marked with a DataMember attribute as public</Name>
    <Description>
      Review properties marked with DataMemberAttribute to ensure they have a public scope.
    </Description>
    <Url></Url>
    <Resolution>Scope the '{0}' property as public.</Resolution>
    <Email>
    </Email>
    <MessageLevel Certainty="95">Warning</MessageLevel>
    <FixCategories>NonBreaking</FixCategories>
    <Owner />
  </Rule>
  <Rule TypeName="ScopeDataContractClassAsPublic"
        Category="Community.Design"
        CheckId="CD1004">
    <Name>Scope classes marked with a DataContract attribute as public</Name>
    <Description>
      Review classes marked with DataContractAttribute to ensure they have a public scope.
    </Description>
    <Url></Url>
    <Resolution>Scope the '{0}' class as public.</Resolution>
    <Email>
    </Email>
    <MessageLevel Certainty="95">Warning</MessageLevel>
    <FixCategories>NonBreaking</FixCategories>
    <Owner />
  </Rule>
</Rules>